package com.gxl.butt;

/**
 * Created by Administrator on 2018/11/8.
 */

// 懒汉式单例
public class Singleton2 {

    // 私有构造
    private Singleton2() {

    }

    private static Singleton2 single = null;

    public static Singleton2 getInstance() {
        if(single == null){
            single = new Singleton2();
        }
        return single;
    }

}

